 
 //////////////////////////////定义ajax处理函数和回掉函数//////////////////////////////////////
 function processRequest() {
        if (http_request.readyState == 4) { // 判断对象状态
            if (http_request.status == 200) { // 信息已经成功返回，开始处理信息
                var info=http_request.responseText;
                var value_array =info.split("|");  
                if(value_array[0]=="-1"){
                  alert("管理台与理财核心通信失败！");
                  return;
                
                }
                else if(value_array[0]=="-2"){
                  alert("理财系统核心操作失败！");
                  return;
                
                }else if(value_array[0]=="-3"){
                  alert("数据库操作操作失败！");
                  return;
                
                }else if(value_array[0]=="-4"){
			      alert("无此交易,或者本柜员无此权限！");
			      return;
		        }else if(value_array[0]=="-5"){
			      alert("柜员登陆超时！");
			      return;
		        }else if(value_array[0]=="-9"){
			      alert(value_array[1]);
			      return;
		        }
                else{
                var sel1= false;
                sel1=document.all("model_prd_code");
                sel1.options.length=0;  //删除所有选项，重组机构列表
                 var ption1=document.createElement("Option");
                 ption1.text="请选择产品代码";        
                 ption1.value="-1";        
                 sel1.options.add( ption1);
                for(var i=0;i<parseInt(value_array[0]);i++){
                 var temOption=document.createElement("Option");
                 var value=value_array[i+1].split(",");
                 temOption.text= value[0]+"--"+value[1];
                 temOption.value=value[0];
                 sel1.options.add(temOption);
                 } 
                }
            } else { //页面不正常
                alert("动态更新产品列表失败！");
            }
        }
    }
   
    /*
    *根据TA代码过滤产品代码
    */
    function getPrdList() {
      var ta_code=document.getElementById("model_ta_code");
        if(ta_code.value== "-1"){   
          return;
        }else{ 
           send_request("MsyhXtgl002qry?trSubCode=pr0&httpRequestMode=1&ta_code="+document.getElementById("model_ta_code").value,processRequest);
        } 
    } 

	/*
	*组合复选框选中的值
	*/
 function converCheckStr(name,hiddenname){ 
      var str="";   
       for(i=0;i<document.frmList.elements.length;i++)
       { 
        if(document.frmList.elements[i].type=="checkbox" && document.frmList.elements[i].checked == true && document.frmList.elements[i].name.indexOf(name)!=-1)
        {
        str+=document.frmList.elements[i].value;
        }
      else
       {
        continue;
        }
       }
    document.all(hiddenname).value=str;
   }
   
 /****************************************
 * 设置checkbox 复选的值
 *****************************************/  
 function  setCheckBoxValue(name,value){
     for(i=0;i<document.frmList.elements.length;i++)
       {
        if(document.frmList.elements[i].type=="checkbox"  && document.frmList.elements[i].name.indexOf(name)!=-1)
        {
               if( value.indexOf(document.frmList.elements[i].value)!=-1 ){  //如果传入值包含此复选框的值则将复选框置位选中状态
                      document.frmList.elements[i].checked = true;           //否则置为未选中状态
               }else{
                      document.frmList.elements[i].checked = false;
               }
        }
        else
        {
             continue;
        }

      }
 
 }
 
 /***************************************
 * 设置下拉列表框值
 ****************************************/
 function setSelectListValue(obj,value){
	var cnt = obj.options.length;
	var i = 0;
	for( i = 0; i < cnt; i++ ){
		var option = obj.options[i];
		if(option.value==value){
			 option.selected=true;
		}
	}
 }
 
 /********************************************
 * 设置control_flag的value，以及对应单选框的选中状态
 *********************************************/
function setControlFlagCheckBoxAndRadio3(value){
     for( var n = 0 ; n < value.length; n++){
         var selected = value.charAt(n);
       var control_flags = document.getElementsByName("0_"+n);
         
         for(var i=0;i<control_flags.length;i++ ){
			 if(control_flags[i].value.split(",")[1] == selected ){ 
                            control_flags[i].checked=true;
			   }
		  }
     }
 } 
/********************************************
 * 设置control_flag的value，以及对应单选框的选中状态
 *********************************************/
function setControlFlagCheckBoxAndRadio(value){
     var control_flags = document.getElementsByName("control_flag_checkbox0");
     //for(var k = 0 ; k < control_flags.length; k++){
     //    alert("control_flag"+k+" = "+control_flags[k].value);
     //}
     for( var n = 0 ; n < value.length; n++){
         var selected = value.charAt(n);
         for(var i=0;i<control_flags.length;i++ ){
             //alert("control_flags["+i+"].value = "+control_flags[i].value+" selected = "+selected);
			 if(control_flags[i].value.split(",")[0] == n ){ 
				  control_flags[i].value= control_flags[i].value.split(",")[0]+","+selected;
				  //alert("tbproduct "+n+"位 selected = "+selected);
				  var control_radio=document.getElementsByName("0_"+n);
				  for(var j=0;j<control_radio.length;j++){
                      var selectedValue=control_radio[j].value.split(",");
                      //alert(" selectedValue[1] = "+selectedValue[1]);
                      if(selectedValue[1] = selected){
                            control_radio[j].checked=true;
                      }
                   }
			   }
		  }
			 
     }
 }
 
 function setControlFlagCheckBoxAndRadio1(value){ 
     var control_flags = document.getElementsByName("control_flag_checkbox1");
     for( var n = 0 ; n < value.length; n++){
         var selected = value.charAt(n);
         for(var i=0;i<control_flags.length;i++ ){
			 if(control_flags[i].value.split(",")[0]== n ){ 
				 control_flags[i].value= control_flags[i].value.split(",")[0]+","+selected;
				   //alert("tbprdextend "+n+"位 selected = "+selected);
				  var control_radio=document.getElementsByName("1_"+n);
				  for(var j=0;j<control_radio.length;j++){
                      var selectedValue=control_radio[j].value.split(",");
                      if(selectedValue[1] = selected){
                            control_radio[j].checked=true;
                      }
                   }
			   }
		  }
			 
     }
 }
 
    
////////////////////////////////////checkArray//////////////////////////////////////////////////



/////////////////////////////////////////////
function myAdd(funcId,subCode){
    var checkinput = document.getElementById("checkinput").value;
    var checkArray = new Array(
           new Array("prd_code", "产品代码","chkinput","chklength","unchkformat","",new Array("6"), "",validParameterStr),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("prd_name", "产品名称","chkinput","chklength","unchkformat","",new Array("60"),"max",validParameterStr),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("ta_code","TA代码","chkinput","chklength","chkformat","unchkcascade",new Array("6"),"max",validSelect),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           //new Array("prd_type","产品类别","chkinput","chklength","unchkformat","unchkcascade",new Array("1"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("curr_type","币种","chkinput","chklength","unchkformat","",new Array("3"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           //new Array("face_value", "产品面值","chkinput","unchklength","chkformat","",new Array("6"), "max",valid_notnegreal),      //输入控制  长度控制为6       格式检查    不级联控制
          // new Array("iss_price", "发行价格","chkinput","unchklength","chkformat","",new Array("4"),"max",valid_notnegreal),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("nav","产品净值","chkinput","unchklength","chkformat","unchkcascade",new Array("100"),"max",valid_notnegreal),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("nav_days","净值天数","chkinput","unchklength","chkformat","unchkcascade",new Array("100"),"max",valid_noneglong),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("branch_no","产品主办机构","chkinput","unchklength","chkformat","unchkcascade",new Array("1","16"),"and",validReguNumber), 
           new Array("ipo_start_date","募集开始日期","chkinput","unchklength","chkformat","",new Array("7"),"max",validDate),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("ipo_end_date", "募集结束日期","chkinput","unchklength","chkformat","",new Array("6"), "max",validDate),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("estab_date", "产品成立日期","chkinput","unchklength","chkformat","",new Array("4"),"max",validDate),              //输入控制  长度不控制        格式检查    不级联控制
           //new Array("prd_scale","产品规模","chkinput","unchklength","chkformat","unchkcascade",new Array("100"),"max",valid_notnegreal),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("psub_unit","个人最小认购单位","chkinput","unchklength","chkformat","",new Array(""),"",valid_noneglong),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("osub_unit","机构最小认购单位","chkinput","unchklength","chkformat","",new Array(""),"",valid_noneglong),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("pmin_hold","个人最低持有份额","chkinput","unchklength","chkformat","",new Array("14"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("omin_hold","机构最低持有份额","chkinput","unchklength","chkformat","",new Array("14"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("red_days", "赎回资金到账天数","chkinput","unchklength","chkformat","",new Array("6"), "max",valid_noneglong),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("div_days", "分红资金到账天数","chkinput","unchklength","chkformat","",new Array("4"),"max",valid_noneglong),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("refund_days","认申购退款结算天数","","unchklength","chkformat","unchkcascade",new Array("100"),"max",valid_noneglong),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("fail_days","发行失败资金到账天数","chkinput","unchklength","chkformat","",new Array("7"),"max",valid_noneglong),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("pmin_red", "个人单笔最少赎回份额","chkinput","unchklength","chkformat","",new Array("6"), "max",valid_notnegreal),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("omin_red", "机构单笔最小赎回份额","chkinput","unchklength","chkformat","",new Array("4"),"max",valid_notnegreal),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("pmax_red","个人单笔最大赎回份额","chkinput","unchklength","chkformat","unchkcascade",new Array("100"),"max",valid_notnegreal),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("omax_red","机构单笔最大赎回份额","chkinput","unchklength","chkformat","",new Array("7"),"max",valid_notnegreal),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("pfirst_amt", "个人首次最低投资金额","chkinput","unchklength","chkformat","",new Array("6"), "max",valid_notnegreal),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("ofirst_amt", "机构首次最低投资金额","chkinput","unchklength","chkformat","",new Array("4"),"max",valid_notnegreal),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("papp_amt","个人追加最低投资金额","chkinput","unchklength","chkformat","unchkcascade",new Array("100"),"max",valid_notnegreal),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("oapp_amt","机构追加最低投资金额","chkinput","unchklength","chkformat","",new Array("7"),"max",valid_notnegreal),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("pmax_invest_amt","个人追加最低投资金额","chkinput","unchklength","chkformat","",new Array("16"),"max",valid_notnegreal),   
           //new Array("pmin_conv_vol", "个人最低基金转换份数","chkinput","unchklength","chkformat","",new Array("6"), "max",valid_notnegreal),      //输入控制  长度控制为6       格式检查    不级联控制
         //new Array("omin_conv_vol", "机构最低基金转换份数","chkinput","unchklength","chkformat","",new Array("6"), "max",valid_notnegreal),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("pmin_invest_amt", "个人最低定投金额","chkinput","unchklength","chkformat","",new Array("4"),"max",valid_notnegreal),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("omin_invest_amt", "机构最低定投金额","chkinput","unchklength","chkformat","",new Array("4"),"max",valid_notnegreal),              //输入控制  长度不控制        格式检查    不级联控制
           //new Array("prd_sponsor","发起人编号","chkinput","chklength","chkformat","unchkcascade",new Array("3"),"max",validSelect),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("prd_trustee","托管人编号","chkinput","chklength","chkformat","",new Array("16"),"max",validSelect),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("prd_manager", "管理人编号","chkinput","chklength","chkformat","",new Array("16"),"max",validSelect),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("cash_flag", "钞汇标志","chkinput","chklength","unchkformat","",new Array("1"),"max"),              //输入控制  长度不控制        格式检查    不级联控制
           //new Array("cancel_flag","认购隔日撤单标志","chkinput","chklength","unchkformat","unchkcascade",new Array("1"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("div_mode","默认分红方式","chkinput","chklength","unchkformat","",new Array("1"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("offer_pay_way","募集账户支付方式","chkinput","chklength","unchkformat","",new Array("1"),"max"),
           new Array("open_pay_way","开放账户支付方式","chkinput","chklength","unchkformat","",new Array("1"),"max"),
           new Array("open_time", "开市时间","chkinput","unchklength","chkformat","",new Array(""),"max",validTime),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("close_time","闭市时间","chkinput","unchklength","chkformat","",new Array(""),"max",validTime),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
        //===============================
           new Array("order_time","预约购买开始时间","unchkinput","unchklength","chkformat","",new Array(""),"max",validTime2),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
        
           new Array("ipo_time","发行时间","unchkinput","unchklength","chkformat","",new Array("4"),"max",validTime2),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("order_date", "预约购买开始日期","unchkinput","unchklength","chkformat","",new Array("4"),"max",validDate2),              //输入控制  长度不控制        格式检查    不级联控制
         //new Array("dir_start_date", "定向预约开始日期","unchkinput","unchklength","chkformat","",new Array("10"),"max",validDate2),              //输入控制  长度不控制        格式检查    不级联控制
          // new Array("dir_start_time", "定向预约开始时间","unchkinput","unchklength","chkformat","",new Array("10"),"max",validTime2),
          
         //  new Array("dir_free_date", "定向预约释放日期","unchkinput","unchklength","chkformat","",new Array("4"),"max",validDate2),              //输入控制  长度不控制        格式检查    不级联控制
         //  new Array("ored_unit","机构最小赎回单位","chkinput","unchklength","chkformat","",new Array(""),"",valid_noneglong),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
         //  new Array("pred_unit","个人最小赎回单位","chkinput","unchklength","chkformat","",new Array(""),"",valid_noneglong),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("ored_unit", "机构最小赎回单位","chkinput","unchklength","chkformat","",new Array("6"), "max",valid_notnegreal),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("pred_unit", "个人最小赎回单位","chkinput","unchklength","chkformat","",new Array("4"),"max",valid_notnegreal),              //输入控制  长度不控制        格式检查    不级联控制
           
           
           //===============================
         
           new Array("inst_flag","机构控制标志","chkinput","chklength","unchkformat","",new Array("1"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("limit_flag", "额度控制标志","chkinput","chklength","unchkformat","",new Array("10"), "max"),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("conv_flag", "转换状态","chkinput","chklength","unchkformat","",new Array("4"),"max"),              //输入控制  长度不控制        格式检查    不级联控制
           new Array("liqu_mode","账务模式","chkinput","chklength","unchkformat","unchkcascade",new Array("1"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("jyqdvalue","允许渠道组","chkinput","unchklength","unchkformat","",new Array("10"),"max"),           //输入控制  长度控制20－26位  格式不检查  不级联控制  
           new Array("prd_attr", "产品属性","chkinput","chklength","unchkformat","",new Array("8"), "max"),      //输入控制  长度控制为6       格式检查    不级联控制
           new Array("status", "产品状态","chkinput","chklength","unchkformat","",new Array("1"),"max"),             //输入控制  长度不控制        格式检查    不级联控制
           new Array("fhfsvalue","允许的分红方式","chkinput","unchklength","unchkformat","unchkcascade",new Array("100"),"max"),
           //new Array("clientgroupsvalue","允许客户组","chkinput","unchklength","unchkformat","unchkcascade",new Array("100"),"max"),
           new Array("risk_level","产品风险等级","chkinput","chklength","chkformat","",new Array("8"),"max",validSelect),
           new Array("sub_exp","认购导出模式","chkinput","unchklength","chkformat","unchkcascade",new Array("6"),"max",validSelect) ,          //输入控制  长度控制20－26位  格式不检查  不级联控制  
   
          //new Array("bank_no","银行编号","chkinput","chklength","chkformat","",new Array("6"),"max",validReguNormalLetter)  ,
          //  new Array("squareway","结算方式","chkinput","unchklength","chkformat","",new Array("6"),"max",validSelect)  ,
          //  new Array("bank_acc_up_name","申购账号名称",checkinput,"unchklength","chkformat","",new Array("100"),"max",validParameterStr),
         //new Array("bank_acc_up","认申购托管账号",checkinput,"unchklength","chkformat","",new Array("32"),"max",validReguNormalLetter),
           // new Array("bank_acc_down","赎回账号",checkinput,"unchklength","chkformat","",new Array("32"),"max",validReguNormalLetter),
           // new Array("bank_name","账户开户银行",checkinput,"unchklength","chkformat","unchkcascade",new Array("60"),"max",validSelect)  ,
           new Array("offer_bank_name","募集托管银行名称",checkinput,"unchklength","chkformat","unchkcascade",new Array("3"),"max",validSelect)  ,
           new Array("open_bank_name","开放托管银行名称",checkinput,"unchklength","chkformat","unchkcascade",new Array("3"),"max",validSelect)  ,
           // new Array("branch_name","账户开户机构",checkinput,"unchkformat","unchkformat","",new Array("100"),"max",validSelect)  ,
            //========
           new Array("debit_account","产品认申购账号",checkinput,"unchklength","chkformat","",new Array("32"),"max",validParameterStr),
           new Array("crebit_account","清算账号",checkinput,"chklength","chkformat","unchkcascade",new Array("32"),"max",validParameterStr)  ,
          //new Array("manage_account","管理费分配账号","chkinput","chklength","chkformat","unchkcascade",new Array("32"),"max",validParameterStr)  ,
          //new Array("charge_account","手续费分配账号","chkinput","chklength","chkformat","unchkcascade",new Array("32"),"max",validParameterStr)  ,
            
            
            //========
           // new Array("prd_name_org","基金公司产品名称","chkinput","chklength","chkformat","unchkcascade",new Array("60"),"max",validParameterStr)  ,
            //new Array("asso_code_org","基金公司产品代码","chkinput","chklength","chkformat","",new Array("6"),"max",validReguNormalLetter) ,
           new Array("asso_code","报送代码","chkinput","chklength","chkformat","",new Array("6"),"max",validReguNormalLetter) ,
           new Array("offer_big_payno","托管机构大额支付号","chkinput","chklength","chkformat","",new Array("20"),"max",validReguNormalLetter) ,
           new Array("offer_acc","托管账号","chkinput","chklength","chkformat","",new Array("32"),"max",validReguNormalLetter) ,
           new Array("offer_acc_name","托管账号名称","chkinput","chklength","chkformat","",new Array("100"),"max") ,
           new Array("open_big_payno","托管机构大额支付号","chkinput","chklength","chkformat","",new Array("20"),"max",validReguNormalLetter) ,
           new Array("open_acc","托管账号","chkinput","chklength","chkformat","",new Array("32"),"max",validReguNormalLetter) ,
           new Array("open_acc_name","托管账号名称","chkinput","chklength","chkformat","",new Array("100"),"max") ,
           //new Array("pre_charge_rate","手续费垫付比例","chkinput","chklength","unchkformat","",new Array("8"),"max",valid_hunrate2) ,
           new Array("commision_rate","尾随佣金比例","chkinput","chklength","unchkformat","",new Array("8"),"max",valid_hunrate2) ,
           new Array("service_fee_rate","销售服务费比例","chkinput","chklength","unchkformat","",new Array("8"),"max",valid_hunrate2) ,
           
              //======tbprdextend===================================  
            //new Array("fare_account","费用账号","chkinput","chklength","chkformat","",new Array("32"),"max",validReguNormalLetter),
            new Array("prove_time_rate","时点证明比例","unchkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
            new Array("prove_date_rate","时短证明比例","unchkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2)
          //new Array("loan_rate","质押比例","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("ipo_amt","计划募集本金金额","chkinput","chklength","chkformat","",new Array("17"),"max",valid_notnegreal),
          //new Array("live_time","产品期限","chkinput","chklength","chkformat","",new Array("3"),"max",validReguNormalLetter),
          //new Array("interest_date","起息日期","unchkinput","unchklength","chkformat","",new Array("10"),"max",validDate2),
          //new Array("end_date","到期日期","unchkinput","unchklength","chkformat","",new Array("10"),"max",validDate2),
          //new Array("breakeven_rate","保本率","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("force_red_rate","质押强制赎回比例","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("warn_red_rate","质押预警比例","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("red_sep_days","确认返回天数","chkinput","unchklength","chkformat","unchkcascade",new Array("100"),"max",valid_noneglong)           //输入控制  长度控制20－26位  格式不检查  不级联控制  
          //new Array("manage_fee_rate","产品管理费率","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("renege_rate","违约金（率）","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("income_rate","预计收益率","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("income_min_rate","最低收益率","chkinput","chklength","chkformat","",new Array("6"),"max",valid_hunrate2),
          //new Array("invest_item","投资标的","unchkinput","chklength","chkformat","",new Array("60"),"max",validParameterStr),
          //new Array("invest_object","投资对象","unchkinput","chklength","chkformat","",new Array("60"),"max",validParameterStr)
             

);


   converCheckStr("div_modes","fhfsvalue");  //组合复选框的值
   converCheckStr("channels","jyqdvalue");   //组合复选框的值
   converCheckStr("client_groups","clientgroupsvalue");   //组合复选框的值
   
   if(document.all("prd_code").value == "000000"){
           alert("产品代码不能为000000");
           return ;
   }
   
   if(!checkForm(frmList,checkArray,"",""))
       return;
       
   var ipo_start_date = document.all("ipo_start_date");
   var ipo_end_date = document.all("ipo_end_date");
   var estab_date = document.all("estab_date");
   var open_time = document.all.open_time.value;
   var close_time = document.all.close_time.value;
   var pmin_red = document.all.pmin_red.value;
   var pmax_red = document.all.pmax_red.value;
   var omin_red = document.all.omin_red.value;
   var omax_red = document.all.omax_red.value;
   
   /*
   var interest_date=document.all("interest_date");
   var end_date   =document.all("end_date");
   
   if(!checkDate(interest_date,end_date))
   {   alert("起息日期不能大于产品到期日期!");
       return;
   }*/
   

   if(compareTime(open_time,close_time)>0)
   {  
    
     alert("开市时间不能大于闭市时间!");
        return;
   }
    
   if(parseFloat(pmin_red)>0 && parseFloat(pmax_red)>0){
     if(compareDouble(pmin_red,pmax_red)>0)
     {
        alert("个人单笔最少赎回份额不能大于个人单笔最大赎回份额!");
        return;
     }
     
   }
     if(parseFloat(omin_red)>0 && parseFloat(omax_red)>0){  
     if(compareDouble(omin_red,omax_red)>0)
    {
     alert("机构单笔最少赎回份额不能大于机构单笔最大赎回份额!");
        return;
     }
   
      }  
   
        
   if(!checkDate(ipo_start_date,ipo_end_date))
   {
     	alert("募集开始日期不能大于募集结束日期!");
        return;
   }
   if(!checkDate(ipo_end_date,estab_date))
   {   alert("募集结束日期不能大于产品成立日期!");
       return;
   }
   
    //如果按组额度控制，组额度编码必选
   if(document.frmList.limit_flag.value =="3" && document.frmList.asso_code.value=="-1" ){
          alert("组额度代码未选");
          return;
   }

    if( document.frmList.fhfsvalue.value.indexOf(document.frmList.div_mode.value)==-1 ){
        
        alert("允许的分红方式必须包含默认分红方式");
        return;
    
    }
    
    //校验开闭市时间
    ajaxCheckForm();
    //开闭市时间校验没有通过则直接返回
    if(document.frmList.timeCheckFlag.value=="0"){
        return;
    }
    
    // 设置产品表和产品扩展表的 controlflag字段
   	var prd_positionAndValue = ""; 
   	var ext_positionAndValue = "";  
    var coolArray = document.getElementsByTagName("input");
    for(var i=0;i<coolArray.length ;i++){
    	if(coolArray[i].type=="radio"){
    		if(coolArray[i].checked){
	    		var tagName = coolArray[i].name;
	    		//alert(tagName +"--------------"+coolArray[i].value);
	    		if(tagName.split("_")[0]==0){
	    			var j =0;
	   				prd_positionAndValue = prd_positionAndValue + coolArray[i].value ;
	   				j++;
	   				if(j!=0){
	    				j++;
	    				prd_positionAndValue = prd_positionAndValue + "|" ;	
	    			}
	   			
	   			}
	   			//else if(tagName.split("_")[0]==1){
	   			//	var j =0;
	   			//	ext_positionAndValue = ext_positionAndValue + coolArray[i].value ;
	   			//	j++;
	   			//	if(j!=0){
	    		//		j++;
	    		//		ext_positionAndValue = ext_positionAndValue + "|" ;	
	    		//	}
	   			//}	
    		}
    		
    	}
    }
   // alert(prd_positionAndValue);
  //  alert(ext_positionAndValue);
    document.frmList.control_flag_prd.value=prd_positionAndValue;
	document.frmList.control_flag_ext.value=ext_positionAndValue;
	
	document.frmList.crebit_account.disabled = false;
	document.frmList.debit_account.disabled = false;
	
    
    //sAlert("授权校验中...请稍候");
  /* 	if(!transAuth(frmList,"false"))
   	{
       	closeAlertWindow();
       	return;
   	}
   	closeAlertWindow();
   	sAlert("处理中...请稍候");*/
   
   	
    document.frmList.action = funcId+"?trSubCode="+subCode;
    document.frmList.submit();
    //getAuthId(funcId,subCode);

}

var win=null;
function showModel(){
       if(win==null){
         win= new Ext.Window({
        title: '基金业务产品信息新增',
        width: 400,
        minWidth: 350, 
        height: 280,
        modal: true,
        closeAction: 'hide',
        contentEl:'modelWindow',
        bodyStyle: 'padding:10px;'
        
    });
    
    }
    
   var cancelButton=null; 
   var submitButton=null; 
   submitButton=new Ext.Button({
        text: '提交',
        renderTo: 'buttonTd1',
        handler: function(){
        document.getElementById("modelWindow").style.display="none";
        if(submitButton!=null){
            submitButton.destroy();
        }
        if(cancelButton!=null){
            cancelButton.destroy();
        }
        win.hide();
        sAlert("获取模板信息中...请稍候");
        getModelPrdInfo();
        
        }
    });
    
    
    cancelButton=new Ext.Button({
        text: '取消',
        renderTo: 'buttonTd2',
        handler: function(){
        document.getElementById("modelWindow").style.display="none";
        if(submitButton!=null){
            submitButton.destroy();
        }
        if(cancelButton!=null){
            cancelButton.destroy();
        }
        win.hide();
        
        }
    });
    
      function hideScreen(){
		if(submitButton!=null){
            submitButton.destroy();
        }
        if(cancelButton!=null){
            cancelButton.destroy();
        }
        
	 }
		
      win.on({
        	   'hide': {
        		fn: hideScreen
        	}
      });
        
     document.getElementById("modelWindow").style.display="";
     win.show();
}
/*Ext.onReady(function(){
    
      var tabs = new Ext.TabPanel({
        renderTo: 'tabsPanel',
        width:800,
        activeTab: 0,
        frame:true,
        defaults:{autoHeight: true},
        items:[
            {contentEl:'tabItem1', title: '产品基本信息'},
            {contentEl:'tabItem2', title: '产品控制参数'},
            {contentEl:'tabItem3', title: '报送信息参数维护'}
          //  {contentEl:'tabItem4', title: '扩展信息参数维护'}
        ]
    });
    
    tabs.activate(1);     //将面板1初始化
    tabs.activate(2);
    tabs.activate(3);     //将面板3初始化
    tabs.activate(0);     //将面板2初始化
   
    
});*/
 
 /*************************************
 *      根据字段名称获取指定字段的值
 **************************************/
 function getDbFiledValue(fieldNameList,fieldValueList,fieldName){
     
        if(fieldNameList.length!=fieldValueList.length){
               return "";
        }
        
        for(var i=0;i< fieldNameList.length ;i++){
          
            if(fieldNameList[i].toLowerCase()==fieldName){
                   
                  return  fieldValueList[i];
            }
        }
        
        return "";
 }
 
 
 function processModelPrdInfo() {
        if (http_request.readyState == 4) { // 判断对象状态
            if (http_request.status == 200) { // 信息已经成功返回，开始处理信息
                var info=http_request.responseText;
                //alert(info);
                var value_array =info.split("|");  
                if(value_array[0]=="-1"){
                  alert("管理台与理财核心通信失败！");
                  closeAlertWindow();
                  return;
                }
                else if(value_array[0]=="-2"){
                  alert("理财系统核心操作失败！");
                  closeAlertWindow();
                  return;
                
                }else if(value_array[0]=="-3"){
                  alert("数据库操作操作失败！");
                  closeAlertWindow();
                  return;
                
                }else if(value_array[0]=="-4"){
			              alert("无此交易,或者本柜员无此权限！");
			              closeAlertWindow();
			              return;
		            }else if(value_array[0]=="-5"){
			              alert("柜员登陆超时！");
			              closeAlertWindow();
			              return;
		            }else if(value_array[0]=="-9"){
			                alert(value_array[1]);
                      closeAlertWindow();
			          return;
		            }
                
                else{  //开始结果信息的处理
              
                var  fieldNameArray=new Array();  //字段名数组
                var  fieldValueArray=new Array(); //字段值数组
                
                
                 for(var i=0;i<parseInt(value_array[0]);i++){
                     var value=value_array[i+1].split(",");
                     fieldNameArray[i]=value[0];
                     fieldValueArray[i]=value[1]; 
                 }
                 
                 //将模板产品代码获取的信息填充到单元格中
                 //产品基本信息
                 //document.all("ta_code").value= getDbFiledValue(fieldNameArray,fieldValueArray,"ta_code");
                 //document.all("prd_attr").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prd_attr");
                 //document.all("status").value= getDbFiledValue(fieldNameArray,fieldValueArray,"status");
                 //document.all("curr_type").value= getDbFiledValue(fieldNameArray,fieldValueArray,"curr_type");
                 //document.all("risklevel").value= getDbFiledValue(fieldNameArray,fieldValueArray,"risk_level");
                 //document.all("prd_sponsor").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prd_sponsor");
                 //document.all("prd_trustee").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prd_trustee");
                 
                 document.all("prd_manager").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prd_manager");
                 //document.all("cash_flag").value= getDbFiledValue(fieldNameArray,fieldValueArray,"cash_flag");
                 //document.all("inst_flag").value= getDbFiledValue(fieldNameArray,fieldValueArray,"inst_flag");
                 //document.all("limit_flag").value= getDbFiledValue(fieldNameArray,fieldValueArray,"limit_flag");
                 // document.all("cancel_flag").value= getDbFiledValue(fieldNameArray,fieldValueArray,"cancel_flag");
                 document.all("div_mode").value= getDbFiledValue(fieldNameArray,fieldValueArray,"div_mode");
                 document.all("offer_pay_way").value= getDbFiledValue(fieldNameArray,fieldValueArray,"offer_pay_way");
                 document.all("open_pay_way").value= getDbFiledValue(fieldNameArray,fieldValueArray,"open_pay_way");
                 //document.all("conv_flag").value= getDbFiledValue(fieldNameArray,fieldValueArray,"conv_flag");
                 //document.all("liqu_mode").value= getDbFiledValue(fieldNameArray,fieldValueArray,"liqu_mode");
                 //document.all("sub_exp").value= getDbFiledValue(fieldNameArray,fieldValueArray,"sub_exp");
                 
                 
                // setSelectListValue(document.all("ta_code"),getDbFiledValue(fieldNameArray,fieldValueArray,"ta_code"));
                 setSelectListValue(document.all("prd_attr"),getDbFiledValue(fieldNameArray,fieldValueArray,"prd_attr"));
                 setSelectListValue(document.all("status"),getDbFiledValue(fieldNameArray,fieldValueArray,"status"));
                 setSelectListValue(document.all("curr_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"curr_type"));
                 setSelectListValue(document.all("risk_level"),getDbFiledValue(fieldNameArray,fieldValueArray,"risk_level"));
                 //setSelectListValue(document.all("prd_sponsor"),getDbFiledValue(fieldNameArray,fieldValueArray,"prd_sponsor"));
                 setSelectListValue(document.all("prd_trustee"),getDbFiledValue(fieldNameArray,fieldValueArray,"prd_trustee"));
                 setSelectListValue(document.all("prd_manager"),getDbFiledValue(fieldNameArray,fieldValueArray,"prd_manager"));
                 setSelectListValue(document.all("cash_flag"),getDbFiledValue(fieldNameArray,fieldValueArray,"cash_flag"));
                 setSelectListValue(document.all("inst_flag"),getDbFiledValue(fieldNameArray,fieldValueArray,"inst_flag"));
                 setSelectListValue(document.all("limit_flag"),getDbFiledValue(fieldNameArray,fieldValueArray,"limit_flag"));
                 //setSelectListValue(document.all("cancel_flag"),getDbFiledValue(fieldNameArray,fieldValueArray,"cancel_flag"));
                 setSelectListValue(document.all("div_mode"),getDbFiledValue(fieldNameArray,fieldValueArray,"div_mode"));
//                 setSelectListValue(document.all("payment_way"),getDbFiledValue(fieldNameArray,fieldValueArray,"payment_way"));
                 setSelectListValue(document.all("conv_flag"),getDbFiledValue(fieldNameArray,fieldValueArray,"conv_flag"));
                 setSelectListValue(document.all("liqu_mode"),getDbFiledValue(fieldNameArray,fieldValueArray,"liqu_mode"));
                 setSelectListValue(document.all("sub_exp"),getDbFiledValue(fieldNameArray,fieldValueArray,"sub_exp"));
                 
                 document.all("face_value").value= getDbFiledValue(fieldNameArray,fieldValueArray,"face_value");
                 //document.all("iss_price").value= getDbFiledValue(fieldNameArray,fieldValueArray,"iss_price");
                 document.all("nav").value= getDbFiledValue(fieldNameArray,fieldValueArray,"nav");
                 document.all("nav_days").value= getDbFiledValue(fieldNameArray,fieldValueArray,"nav_days");
                 //document.all("prd_scale").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prd_scale");
                 
                 document.all("ipo_start_date").value= getDbFiledValue(fieldNameArray,fieldValueArray,"ipo_start_date");
                 document.all("ipo_end_date").value= getDbFiledValue(fieldNameArray,fieldValueArray,"ipo_end_date");
                 document.all("estab_date").value= getDbFiledValue(fieldNameArray,fieldValueArray,"estab_date");
                 document.all("branch_no").value= getDbFiledValue(fieldNameArray,fieldValueArray,"branch_no");
                 //产品控制参数
                 document.all("psub_unit").value= getDbFiledValue(fieldNameArray,fieldValueArray,"psub_unit");
                 
                 document.all("osub_unit").value= getDbFiledValue(fieldNameArray,fieldValueArray,"osub_unit");
                 document.all("pmin_hold").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pmin_hold");
                 document.all("omin_hold").value= getDbFiledValue(fieldNameArray,fieldValueArray,"omin_hold");
                 document.all("red_days").value= getDbFiledValue(fieldNameArray,fieldValueArray,"red_days");
                 document.all("div_days").value= getDbFiledValue(fieldNameArray,fieldValueArray,"div_days");
                 document.all("refund_days").value= getDbFiledValue(fieldNameArray,fieldValueArray,"refund_days");
                 document.all("fail_days").value= getDbFiledValue(fieldNameArray,fieldValueArray,"fail_days");
                 document.all("tot_client").value= getDbFiledValue(fieldNameArray,fieldValueArray,"tot_client");
                 document.all("pmin_red").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pmin_red");
                 document.all("omin_red").value= getDbFiledValue(fieldNameArray,fieldValueArray,"omin_red");
                 document.all("pmax_red").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pmax_red");
                 document.all("omax_red").value= getDbFiledValue(fieldNameArray,fieldValueArray,"omax_red");
                 document.all("pfirst_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pfirst_amt");
                 document.all("ofirst_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"ofirst_amt");
                 document.all("papp_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"papp_amt");
                 document.all("oapp_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"oapp_amt");
                 document.all("pmax_invest_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pmax_invest_amt");
                 
                 document.all("pmin_conv_vol").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pmin_conv_vol");                
                document.all("omin_conv_vol").value= getDbFiledValue(fieldNameArray,fieldValueArray,"omin_conv_vol");
                 
                 document.all("pmin_invest_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pmin_invest_amt");
                 document.all("omin_invest_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"omin_invest_amt");
                  //=======================================
                document.all("debit_account").value= getDbFiledValue(fieldNameArray,fieldValueArray,"debit_account");
                document.all("crebit_account").value= getDbFiledValue(fieldNameArray,fieldValueArray,"crebit_account");
                // document.all("manage_account").value= getDbFiledValue(fieldNameArray,fieldValueArray,"manage_account");
                // document.all("charge_account").value= getDbFiledValue(fieldNameArray,fieldValueArray,"charge_account");

                  //=======================================
                 
                //  document.all("bank_no").value= getDbFiledValue(fieldNameArray,fieldValueArray,"bank_no");
                 //  setSelectListValue(document.all("squareway"),getDbFiledValue(fieldNameArray,fieldValueArray,"squareway"));
                //   document.all("bank_acc_up").value= getDbFiledValue(fieldNameArray,fieldValueArray,"bank_acc_up");
                 //  document.all("bank_acc_down").value= getDbFiledValue(fieldNameArray,fieldValueArray,"bank_acc_down");
                 //  document.all("bank_name").value= getDbFiledValue(fieldNameArray,fieldValueArray,"bank_name");
                 document.all("offer_bank_name").value= getDbFiledValue(fieldNameArray,fieldValueArray,"offer_bank_name");
                 document.all("open_bank_name").value= getDbFiledValue(fieldNameArray,fieldValueArray,"open_bank_name");
                  // document.all("branch_name").value= getDbFiledValue(fieldNameArray,fieldValueArray,"branch_name");
                 //document.all("prd_name_org").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prd_name_org");
                  // document.all("asso_code_org").value= getDbFiledValue(fieldNameArray,fieldValueArray,"asso_code_org");
                document.all("asso_code").value= getDbFiledValue(fieldNameArray,fieldValueArray,"asso_code");
                document.all("offer_big_payno").value= getDbFiledValue(fieldNameArray,fieldValueArray,"offer_big_payno");
                document.all("offer_acc").value= getDbFiledValue(fieldNameArray,fieldValueArray,"offer_acc");
                document.all("offer_acc_name").value= getDbFiledValue(fieldNameArray,fieldValueArray,"offer_acc_name");
                document.all("open_big_payno").value= getDbFiledValue(fieldNameArray,fieldValueArray,"open_big_payno");
                document.all("open_acc").value= getDbFiledValue(fieldNameArray,fieldValueArray,"open_acc");
                document.all("open_acc_name").value= getDbFiledValue(fieldNameArray,fieldValueArray,"open_acc_name");
                //document.all("pre_charge_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pre_charge_rate");
                document.all("commision_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"commision_rate");
                document.all("service_fee_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"service_fee_rate");
                
                     //   for(var j =0;j<fieldNameArray.length;j++){
                           
                     //       alert(fieldNameArray[j]);
                     //   }
                 //============tbprdextend=====================
                   document.all("prd_sub_type").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prd_sub_type");
                   //document.all("fare_account").value= getDbFiledValue(fieldNameArray,fieldValueArray,"fare_account");
                   setSelectListValue(document.all("renege_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"renege_type"));
                
                //   document.all("loan_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"loan_rate");
                //   document.all("control_flag1").value= getDbFiledValue(fieldNameArray,fieldValueArray,"control");
                //   document.all("prove_time_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prove_time_rate");
                   document.all("prove_date_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"prove_date_rate");
                   setSelectListValue(document.all("interest_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"interest_type"));
                
                   document.all("invest_item").value= getDbFiledValue(fieldNameArray,fieldValueArray,"invest_item");
                   document.all("invest_object").value= getDbFiledValue(fieldNameArray,fieldValueArray,"invest_object");
                   setSelectListValue(document.all("fund_mode"),getDbFiledValue(fieldNameArray,fieldValueArray,"fund_mode"));
                   setSelectListValue(document.all("force_mode"),getDbFiledValue(fieldNameArray,fieldValueArray,"force_mode"));
                   document.all("ipo_amt").value= getDbFiledValue(fieldNameArray,fieldValueArray,"ipo_amt");
                   document.all("live_time").value= getDbFiledValue(fieldNameArray,fieldValueArray,"live_time");
                   setSelectListValue(document.all("liv_time_unit"),getDbFiledValue(fieldNameArray,fieldValueArray,"liv_time_unit"));
                  // document.all("interest_date").value= getDbFiledValue(fieldNameArray,fieldValueArray,"interest_date");
                  // document.all("end_date").value= getDbFiledValue(fieldNameArray,fieldValueArray,"end_date");
                   document.all("breakeven_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"breakeven_rate");
                  //document.all("force_red_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"force_red_rate");
                  //document.all("warn_red_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"warn_red_rate");
                   setSelectListValue(document.all("manage_fee_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"manage_fee_type"));
                   
                   document.all("manage_fee_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"manage_fee_rate");
                   //setSelectListValue(document.all("charge_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"charge_type"));
                   document.all("renege_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"renege_rate");
                   setSelectListValue(document.all("income_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"income_type"));
                   document.all("income_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"income_rate");
                   //document.all("income_min_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"income_min_rate");
                   document.all("income_min_rate").value= getDbFiledValue(fieldNameArray,fieldValueArray,"income_min_rate");                 
                 //============================================    
                     
                   //  document.all("red_sep_days").value= getDbFiledValue(fieldNameArray,fieldValueArray,"red_sep_days");
                     document.all("ipo_time").value= getDbFiledValue(fieldNameArray,fieldValueArray,"ipo_time");
                     document.all("order_date").value= getDbFiledValue(fieldNameArray,fieldValueArray,"order_date");
                     document.all("order_time").value= getDbFiledValue(fieldNameArray,fieldValueArray,"order_time");
                   //  document.all("dir_free_date").value= getDbFiledValue(fieldNameArray,fieldValueArray,"dir_free_date");
                     document.all("ored_unit").value= getDbFiledValue(fieldNameArray,fieldValueArray,"ored_unit");
                     document.all("pred_unit").value= getDbFiledValue(fieldNameArray,fieldValueArray,"pred_unit");
                   //  setSelectListValue(document.all("dir_order_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"dir_order_type"));
                     setSelectListValue(document.all("agio_type"),getDbFiledValue(fieldNameArray,fieldValueArray,"agio_type"));
                 //============================================    
                 if(document.all("limit_flag").value=="3"){
                        document.getElementById("limitCodeTr").style.display="";   //显示 
                        document.all("asso_code").value= getDbFiledValue(fieldNameArray,fieldValueArray,"asso_code");   
                 }else{
                        document.getElementById("limitCodeTr").style.display="none"; //影藏
                 }    
    
                 
                 //设置允许分红方式复选框
                 setCheckBoxValue("div_modes",getDbFiledValue(fieldNameArray,fieldValueArray,"div_modes"));
                 //设置允许渠道组
                 setCheckBoxValue("channels",getDbFiledValue(fieldNameArray,fieldValueArray,"channels"));
                 //设置允许客户组
                 //setCheckBoxValue("client_groups",getDbFiledValue(fieldNameArray,fieldValueArray,"client_groups"));               
                 //设置控制标志的值
                 setControlFlagCheckBoxAndRadio3(getDbFiledValue(fieldNameArray,fieldValueArray,"control_flag"));
                 //setControlFlagCheckBoxAndRadio1(getDbFiledValue(fieldNameArray,fieldValueArray,"control_flag1"));
                 
                 setControlFlagByAjax(getDbFiledValue(fieldNameArray,fieldValueArray,"controlflaginfo"));
                 closeAlertWindow();
                 
                 } 
 

                
                }
            
            
            else { //页面不正常
                alert("动态更新产品列表失败！");
                closeAlertWindow();
            }
        }
        
        }
    
   

    function getModelPrdInfo() {
      var ta_code=document.getElementById("model_ta_code");
      var prd_code = document.all("model_prd_code");
      var tempApplySelect = "";
      if(document.getElementById("applyOption1").checked == true){
        tempApplySelect += document.getElementById("applyOption1").value;
      }
      if(document.getElementById("applyOption2").checked == true){
        tempApplySelect += document.getElementById("applyOption2").value;
      }
       if(document.getElementById("applyOption3").checked == true){
        tempApplySelect += document.getElementById("applyOption3").value;
      }
       if(document.getElementById("applyOption4").checked == true){
        tempApplySelect += document.getElementById("applyOption4").value;
      }
       if(document.getElementById("applyOption5").checked == true){
        tempApplySelect += document.getElementById("applyOption5").value;
      }
       if(document.getElementById("applyOption6").checked == true){
        tempApplySelect += document.getElementById("applyOption6").value;
      }
     // alert(tempApplySelect);
      document.getElementById("applySelect").value = tempApplySelect;
      document.getElementById("model_ta_code_temp").value = ta_code.value;
      document.getElementById("model_prd_code_temp").value = prd_code.value;
      if(ta_code.value== "-1" || prd_code.value=="-1"){   
       alert("模板产品代码或者模板TA代码未选");
       closeAlertWindow();
       return;
      }else{ 
           send_request("MsyhXtgl002qry?trSubCode=mod&httpRequestMode=1&ta_code="+ta_code.value+"&prd_code="+prd_code.value,processModelPrdInfo);
      } 
    
    }

